package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.service.UnitService;
import net.wanho.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/unit")
public class UnitController {
    private final UnitService unitService;
    @GetMapping("/unit-list")
    public R unitList(){
        return R.success(unitService.list());
    }
}
